#pragma once
#include<functional>
#include<unistd.h>
#include<iostream>
//任务形式1：
using TaskFunc=std::function<void()>;
void Down(){
    std::cout<<"Down"<<std::endl;
    sleep(1);
}
void Delete(){
    std::cout<<"Delete"<<std::endl;
    sleep(1);
}
//任务形式2:
class Task {
public:
    Task(){}
    Task(int x,int y):x(x),y(y){}
    void Execute(){
        _result=x+y;
    }
    int X(){return x;}
    int Y(){return y;}
    int Result(){return _result;}
private:
    int x;
    int y;
    int _result;
};